﻿@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@model MockSchoolManagement.Mvc.ViewModel.LoginViewModel
@{
    ViewBag.Titile = "用户登录";
}

<h1>用户登录</h1>

<div class="row">
    <div class="col-md-6">
        <form method="post">
            <div asp-validation-summary="All" class="text-danger"></div>
            <div class="form-group">
                <label asp-for="Email"></label>
                <input asp-for="Email" class="form-control"/>
                <span asp-validation-for="Email" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Password"></label>
                <input asp-for="Password" class="form-control"/>
                <span asp-validation-for="Password" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="RememberMe"></label>
                <input asp-for="RememberMe" class="form-check-inline"/>
                <span asp-validation-for="RememberMe" class="text-danger"></span>
            </div>
            <div>
                <a asp-action="ForgotPassword">找回密码</a>
            </div>
            <button type="submit" class="btn btn-primary">登录</button>
        </form>
    </div>
    <div class="col-md-6">
        <h1>扩展登录</h1>
        <form class="mt-3" method="post" asp-action="ExternalLogin" asp-route-returnUrl="@Model.ReturnUrl">
            <div>
                @foreach (var provider in Model.ExternalLogins)
                {
                    <button type="submit" class="btn btn-info" name="provider" value="@provider.Name" title="Log in using your @provider.DisplayName account">
                        @provider.DisplayName
                    </button>
                }
            </div>
        </form>
    </div>
</div>


@section Scripts
{
    @{ await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
